<template>
  <div class="container">
    <div class="content">
      <img :src="$store.state.company_logo" alt @click="reload" />
      <div v-for="(item, index) in list" :key="index">
        <p>{{item.name}}</p>
        <span
          v-for="(item, index) in item.list"
          :key="index"
          @click="$router.push({
          path: '/article',
          query:{
            id: item.id
          }
        })"
        >{{item.name}}</span>
      </div>
      <div>
        <p>Follow</p>
        <div>
          <div>
            <img src="@/assets/ed1.png" alt />
          </div>
          <div>
            <img src="@/assets/ed2.png" alt />
          </div>
          <div>
            <img src="@/assets/ed3.png" alt />
          </div>
          <div>
            <img src="@/assets/ed4.png" alt />
          </div>
        </div>
      </div>
    </div>
    <div class="other">{{$store.state.company_copyright}}</div>
    <div class="other">
      <div>
        <img src="@/assets/f1.png" alt />
        <span>沪ICP备18022566号-3</span>
      </div>
      <div class="btn" @click="changePage">
        <img src="@/assets/f2.png" alt />
        <span>电子执照</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: []
    };
  },
  created() {
    let _this = this;
    _this.$axios.get("content").then(res => {
      _this.list = res;
    });
  },
  methods: {
    changePage() {
      window.open(
        "http://218.242.124.22:8081/businessCheck/verifKey.do?showType=extShow&serial=9031000020170912191434000002055830-SAIC_SHOW_310000-4028e4cb6ac5c06c016b624d5a7c574d586&signData=MEQCIGObuescTbeAFP8OQpIMUQFVxUKkM2Ms8Sp8eeIsZM28AiBcmGarlHojpuMMdQoD/qoUfJBa2of27L9ckyMduNavFw=="
      );
    },
    reload() {
      location.href = "http://" + location.host;
    }
  }
};
</script>

<style lang="less" scoped>
.container {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.3rem;
  margin-top: 1rem;
  .content {
    width: @width;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    justify-content: space-between;
    border-top: 1px @dark-color solid;
    border-bottom: 1px @dark-color solid;
    padding: 0.5rem 0;
    margin-bottom: 0.2rem;
    @media only screen and (max-width: 500px),
      only screen and (max-device-width: 500px) {
      width: calc(100vw - 0.6rem);
      flex-direction: column;
    }
    > img {
      width: 1.2rem;
      height: 1.2rem;
      cursor: pointer;
      object-fit: contain;
      object-position: top;
      margin-right: 100px;
      @media only screen and (max-width: 500px),
        only screen and (max-device-width: 500px) {
        width: 100%;
      }
    }
    > div {
      flex: 1;
      display: flex;
      flex-direction: column;
      > p {
        color: white;
        font-weight: bold;
        @media only screen and (max-width: 500px),
          only screen and (max-device-width: 500px) {
          text-align: center;
          margin-top: 0.6rem;
        }
      }
      > span {
        font-size: 0.14rem;
        margin-top: 0.2rem;
        cursor: pointer;
        font-weight: lighter;
        color: @node-color;
        @media only screen and (max-width: 500px),
          only screen and (max-device-width: 500px) {
          text-align: center;
        }
      }
      > span:hover::before {
        content: ">> ";
      }
      > div {
        display: flex;
        flex-direction: row;
        margin-top: 10px;
        @media only screen and (max-width: 500px),
          only screen and (max-device-width: 500px) {
          justify-content: center;
        }
        > div {
          width: 50px;
          height: 50px;
          box-sizing: border-box;
          padding: 10px;
          border: 2px @gold-color solid;
          border-radius: 50%;
          margin-right: 10px;
          > img {
            width: 100%;
            height: 100%;
            cursor: pointer;
            object-fit: contain;
            transition: all 300ms;
          }
          > img:hover {
            // background: @dark-color;
            filter: brightness(200%);
          }
        }
      }
    }
  }
  .other {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    margin-top: 0.1rem;
    color: @node-color;
    font-size: @small-size;
    > div {
      display: flex;
      flex-direction: row;
      align-items: center;
      > img {
        width: 0.2rem;
        height: 0.2rem;
        object-fit: contain;
        margin-right: 0.1rem;
      }
    }
    > div + div {
      margin-left: 0.5rem;
    }
    .btn {
      cursor: pointer;
    }
  }
}
</style>
